import { getColumnsData } from "../common";

const userCouponListTable = [
  {
    user_id: "ID: 4997", // 用户ID
    user_name: "账号: 15555555555", // 用户账号
    coupon_id: "1", // 优惠券ID
    use_time: "2023-06-09 16:55:02", // 使用时间
    memo: "备注", // 备注
    status: "已使用", // 状态
    get_time: "2023-06-09 16:55:02" // 领取时间
  }
];

const headerList = [
  {
    width: "100px",
    label: "编号",
    prop: "id",
    sortable: true
  },
  {
    width: "180px",
    label: "用户ID",
    prop: "user_id"
  },
  {
    width: "180px",
    label: "用户账号",
    prop: "user_name"
  },
  {
    label: "优惠券ID",
    prop: "coupon_id"
  },
  {
    label: "使用时间",
    prop: "use_time"
  },
  {
    width: "auto",
    label: "备注",
    prop: "memo"
  },
  {
    label: "状态",
    prop: "status"
  },
  {
    label: "领取时间",
    prop: "get_time"
  },
  {
    label: "操作",
    width: "120px",
    hideCheck: true,
    fixed: "right",
    showValue: [
      {
        class: "",
        key: "删除",
        cellType: "button",
        type: "danger", // 按钮类型
        buttonType: "delete",
        tableType: "userCouponList" // 表格类型,用于点击事件时,区分是哪个表格的按钮
      }
    ]
  }
];

const userCouponListColumns = [];

getColumnsData("userCouponList", userCouponListColumns, headerList, res => {
  console.log("userCouponList", res);
});
export { userCouponListTable, userCouponListColumns };
